<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" 
	import="java.util.List,com.telecom.cms.dao.*,com.telecom.cms.dto.*" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html>
<head>
	<title>集成取数结果展示</title>
	<LINK href="css/default.css" rel=stylesheet>
	<LINK href="css/button.css" rel=stylesheet>
	<LINK href="css/main.css" type=text/css rel=stylesheet>
	<script type="text/javascript" src="js/dtree.js"></script>
<script type="text/javascript">
	function opchange(o){
		var obj=document.all.ObjSelect;
		for(i=0;i<obj.length;i++){
			obj.options[i].selected=true;
		}
		document.idaTemplateForm.method.value=o;
		document.idaTemplateForm.submit();
	}
	
	function showHiddenDiv(id){
		var divstyle=document.getElementById(id).style.display;
		if(divstyle=="none"){
			document.getElementById(id).style.display="";
			document.getElementById("img"+ id).src="images/minu_ico.gif";
		}else{
			document.getElementById(id).style.display="none";
			document.getElementById("img"+ id).src="images/plus_ico.gif";
		}
	}
</script>
</head>
<body>
<html:form action="/ida">
<table width="1000" cellspacing="0" cellpadding="0" border="0" align="center">
<tbody>
	<tr>
		<td width="3" height="31">
			<img height="31" src="./images/table_01.gif" width="3" />
		</td>
		<td background="./images/table_02.gif" height="31">
			<table cellspacing="0" cellpadding="0" width="170" align="left" border="0">
				<tbody>
					<tr>
						<td width="51" background="./images/title_1_bg.gif">
							<img height="31" src="./images/title_1.gif" width="51" />
						</td>
						<td width="150" background="./images/title_1_bg.gif">
							<span class="color_b_666">集成取数结果展示</span>
						</td>
					</tr>
				</tbody>
			</table>
		</td>
		<td width="3">
			<img height="31" src="./images/table_03.gif" width="3" />
		</td>
	</tr>
	<tr>
		<td background="images/table_04.gif">
			<img height="5" src="images/table_04.gif" width="3">
		</td>
		<td style="PADDING-TOP: 3px" valign="top">
		<logic:present name="idaSql" scope="session">
			<table width="100%" border="0" cellspacing="1" cellpadding="2" class="moduleList" bgcolor="#D5D5D5" align="center">
				<tr align="center">
					<th align="left" valign="bottom" onclick="showHiddenDiv('sqlarea')" height="20">
						&nbsp;<img id="imgsqlarea" src="images/plus_ico.gif">&nbsp;查看SQL
					</th>
				</tr>
				<tr id="sqlarea" style="display: none" align="center">
					<td>
						<textarea cols="120" rows="15" readonly="readonly">${idaSql}</textarea>
					</td>
				</tr>
			</table>
		</logic:present>
		<logic:present name="paramValues" scope="session">
			<table width="100%" border="0" cellspacing="1" cellpadding="2" class="moduleList" bgcolor="#D5D5D5" align="center">
				<tr align="center">
					<th align="left" valign="bottom" onclick="showHiddenDiv('paramarea')" height="20">
						&nbsp;<img id="imgparamarea" src="images/plus_ico.gif">&nbsp;查看条件
					</th>
				</tr>
				<tr id="paramarea" style="display: none" align="center">
					<td>
						<table width='100%' border='0' cellspacing='1' cellpadding='2'>
							<tr>
								<td align="center">参数名称</td>
								<td align="center">参数取值</td>
							</tr>
							<logic:iterate name="paramValues" id="p">
								<tr>
									<logic:iterate name="p" id="v">
										<td><bean:write name="v" /></td>
									</logic:iterate>
								</tr>
							</logic:iterate>
						</table>
					</td>
				</tr>
			</table>
		</logic:present>
		<br>
		<logic:present name="idaData" scope="request">
			<table width='100%' border='0' cellspacing='' cellpadding='2'>
				<tr>
					<td align="right" valign="bottom">
						<a href="ida.do?method=doPagingQuery&paging=first">首页</a>
						<a href="ida.do?method=doPagingQuery&paging=previous">上一页</a>
						<a href="ida.do?method=doPagingQuery&paging=next">下一页</a>
						<a href="ida.do?method=doPagingQuery&paging=last">末页</a>
						&nbsp;&nbsp;&nbsp;&nbsp;
						共<bean:write name="rowCount" />条记录，当前第<bean:write name="pageNo" />页，共<bean:write name="pageCount" />页
					</td>
				</tr>
				<tr>
					<td align="left" colspan="2">
						<table width='100%' border='0' cellspacing='1' cellpadding='2'>
							<tr align="center" height="25">
								<logic:iterate name="resultAtoms" id="a">
									<td background="images/table_bg0.GIF"><bean:write name="a" property="BIZ_ATOM_NAME"/></td>
								</logic:iterate>
							</tr>
							<%
								List idaData = (List)request.getAttribute("idaData");
								for (int i = 0; i < idaData.size(); i++){
									out.println("<tr height='20'>");
									String[] row = (String[])idaData.get(i);
									for (int j = 0; j < row.length; j++)
										out.println("<td>" + row[j] + "</td>");
									out.println("</tr>");
								}
							%>
						</table>
					</td>
				</tr>
			</table>
		</logic:present>
		</td>
		<td background="images/table_05.gif">
			<img height="5" src="images/table_05.gif" width="3">
		</td>
	</tr>
	<tr height="3">
		<td height="3">
			<img height="12" src="images/table_06.gif" width="3">
		</td>
		<td height="3">
			<img height="3" src="images/table_07.gif" width="994">
		</td>
		<td height="3">
			<img height="12" src="images/table_08.gif" width="3">
		</td>
	</tr>
</tbody>
</table>
<br />
<html:hidden property="method" value="doPagingQuery" />
</html:form>
</body>
</html>